home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Singles Flirt Up Your Life! (German)
/
Singles Flirt Up Your Life.iso
/
data1.cab
/
Statemachine
/
questErotic5.lua
< prev
next >
Wrap
Text File
|
2004-01-29
|
2KB
|
75 lines
beginStateMachine()
-- called when questor builds up all known questScripts
onEnter(function(msg)
print("questErotic5 entered");
setState("initial");
end )
-- on game over: relationship conditions get reset to 0 and all quests are reset to initial
onMsg("questreset", function(msg)
setState("initial");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("initial")
onMsg("checkCondition", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
if ( -- condition here
----------------
min( mike.getRelationshipCondition(ELAINE, REL_EROTIC),
elaine.getRelationshipCondition(MIKE, REL_EROTIC) ) >= 5)
----------------
then
-- popup kiss chapter
popupChapter("guiStoryChapterGroup2");
setDelayedState("talktome", 10);
end
end )
state("talktome")
onEnter(function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
-- go to talk position
mike.queueCommand("pm_talkCutscene", "talkCutscene", elaine, "questErotic5");
end )
-- assoon as arrived - start dialog
onMsg("talking", function(msg)
if (msg.data == "questErotic5") then
popupConversation("dialogErotic5");
setState("donetalktome");
end
end )
state("donetalktome");
onMsg("yes", function(msg)
local mike = getParent().getParent().getCharacter(MIKE);
local elaine = getParent().getParent().getCharacter(ELAINE);
mike.cancelCurrentActivity();
elaine.cancelCurrentActivity();
setState("done");
end )
---------------------------------------------------------------------------------------------------------------------------------------
state("done")
-- sackgasse hier
endStateMachine()